﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<MVCAddressBook.Models.Entities.UserInfo>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	通讯录列表
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>通讯录列表</h2>
    <span style="color: Red;">
        <%=Html.Encode(TempData["message"]) %></span>
    <table>
        <tr>
            <th></th>
            
            <th>
                Name
            </th>
            <th>
                Mobile
            </th>
            <th>
                QQ
            </th>
            <th>
                Phone
            </th>
            <th>
                Email
            </th>
            <th>
                Address
            </th>
            <th>
                Company
            </th>
            
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink("Edit", "Edit", new { id=item.ID }) %> |
                <%: Html.ActionLink("Details", "Details", new { id=item.ID })%> |
                <%: Html.ActionLink("Delete", "Delete", new { id=item.ID })%>
            </td>
            
            <td>
                <%: item.Name %>
            </td>
            <td>
                <%: item.Mobile %>
            </td>
            <td>
                <%: item.QQ %>
            </td>
            <td>
                <%: item.Phone %>
            </td>
            <td>
                <%: item.Email %>
            </td>
            <td>
                <%: item.Address %>
            </td>
            <td>
                <%: item.Company %>
            </td>
            
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("Create New", "CreateUser") %>
    </p>

</asp:Content>

